package com.qg.controller;

import com.qg.utils.ActiveMQUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    private ActiveMQUtils activeMQUtils;

    public void sendMessage() throws Exception{
        activeMQUtils.sendMessage("qg:test","Im am Massage");
        System.out.println("成功");
    }
    @JmsListenter(destination="qg:test")
    public void getMessage(String message)throws Exception{
    System.out.println(message);
    }
}
